package com.lzy.crm.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.lzy.crm.base.mybatis.BaseMapper;
import com.lzy.crm.base.mybatis.Example;
import com.lzy.crm.base.service.BaseServiceImpl;
import com.lzy.crm.dao.BankCardMapper;
import com.lzy.crm.dao.criteria.BankCardCriteria;
import com.lzy.crm.domain.BankCard;
import com.lzy.crm.service.BankCardService;

@Service("bankCardService")
public class BankCardServiceImpl extends BaseServiceImpl<BankCard,BankCardCriteria> implements BankCardService {

	@Resource
	private BankCardMapper bankCardMapper;
	
	@Override
	public BaseMapper<BankCard, BankCardCriteria> getBaseMapper() {
		return bankCardMapper;
	}

	@Override
	public List<BankCard> getBankCardListByUserId(String userId) {
		Example<BankCardCriteria> example = new Example<BankCardCriteria>(BankCardCriteria.class);
		BankCardCriteria bankCardCriteria = example.createCriteria();
		bankCardCriteria.andUserIdEqualTo(userId);
		return bankCardMapper.getListByExample(example);
	}

}
